<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车 / Shopping Cart - 阿里宝宝</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/components.css">
    <link rel="stylesheet" href="css/responsive.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body>
    <!-- 顶部导航栏 -->
    <header class="header">
        <div class="container">
            <div class="header-content">
                <!-- Logo -->
                <div class="logo">
                    <a href="index.html">
                        <i class="fas fa-shopping-bag"></i>
                        <span>阿里宝宝</span>
                    </a>
                </div>

                <!-- 搜索框 -->
                <div class="search-box">
                    <input type="text" id="searchInput" placeholder="搜索商品... / Search products...">
                    <button id="searchBtn"><i class="fas fa-search"></i></button>
                </div>

                <!-- 用户操作区 -->
                <div class="user-actions">
                    <div class="user-menu" id="userMenu">
                        <button class="user-btn" id="userBtn">
                            <i class="fas fa-user"></i>
                            <span id="userName">登录 / Login</span>
                        </button>
                        <div class="user-dropdown" id="userDropdown">
                            <div class="dropdown-content">
                                <a href="#" id="loginLink">登录 / Login</a>
                                <a href="#" id="registerLink">注册 / Register</a>
                                <a href="#" id="profileLink" style="display: none;">个人中心 / Profile</a>
                                <a href="#" id="ordersLink" style="display: none;">我的订单 / My Orders</a>
                                <a href="#" id="logoutLink" style="display: none;">退出登录 / Login / Logout</a>
                            </div>
                        </div>
                    </div>
                    
                    <div class="cart-icon" id="cartIcon">
                        <a href="cart.html">
                            <i class="fas fa-shopping-cart"></i>
                            <span class="cart-count" id="cartCount">0</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 面包屑导航 -->
    <nav class="breadcrumb">
        <div class="container">
            <ol class="breadcrumb-list">
                <li><a href="index.html">首页 / Home</a></li>
                <li>购物车 / Shopping Cart</li>
            </ol>
        </div>
    </nav>

    <!-- 购物车 / Shopping Cart主要内容 -->
    <main class="cart-main">
        <div class="container">
            <div class="cart-header">
                <h1>购物车 / Shopping Cart</h1>
                <div class="cart-actions">
                    <button class="btn btn-outline" id="selectAllBtn">全选 / Select All</button>
                    <button class="btn btn-outline" id="deselectAllBtn">取消 / Cancel全选 / Select All</button>
                    <button class="btn btn-danger" id="clearCartBtn">清空购物车 / Shopping Cart / Clear Cart</button>
                </div>
            </div>

            <!-- 购物车 / Shopping Cart为空的状态 -->
            <div class="empty-cart" id="emptyCart" style="display: none;">
                <div class="empty-cart-content">
                    <i class="fas fa-shopping-cart"></i>
                    <h2>购物车 / Shopping Cart是空的</h2>
                    <p>快去挑选心仪的商品吧！</p>
                    <a href="index.html" class="btn btn-primary">去购物</a>
                </div>
            </div>

            <!-- 购物车 / Shopping Cart商品列表 -->
            <div class="cart-content" id="cartContent">
                <div class="cart-items" id="cartItems">
                    <!-- 购物车 / Shopping Cart商品将通过JavaScript动态生成 -->
                </div>

                <!-- 购物车 / Shopping Cart汇总 -->
                <div class="cart-summary">
                    <div class="summary-content">
                        <div class="summary-item">
                            <span class="label">已选商品：</span>
                            <span class="value" id="selectedCount">0</span>
                            <span class="unit">件</span>
                        </div>
                        <div class="summary-item">
                            <span class="label">商品总价 / Total：</span>
                            <span class="value" id="subtotal">¥0.00</span>
                        </div>
                        <div class="summary-item">
                            <span class="label">运费 / Shipping：</span>
                            <span class="value" id="shippingFee">¥0.00</span>
                        </div>
                        <div class="summary-item total">
                            <span class="label">应付总额：</span>
                            <span class="value" id="totalAmount">¥0.00</span>
                        </div>
                    </div>
                    
                    <div class="checkout-section">
                        <button class="btn btn-primary btn-large checkout-btn" id="checkoutBtn" disabled>
                            <i class="fas fa-credit-card"></i>
                            结算 / Checkout
                        </button>
                        <button class="btn btn-outline btn-large play-game-btn" id="playGameBtn">
                            <i class="fas fa-gamepad"></i>
                            玩折扣游戏
                        </button>
                    </div>
                </div>
            </div>

            <!-- 推荐商品 -->
            <div class="recommended-products">
                <h2 class="section-title">为您推荐</h2>
                <div class="products-grid" id="recommendedProducts">
                    <!-- 推荐商品将通过JavaScript动态加载 -->
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h3>关于我们</h3>
                    <p>阿里宝宝致力于为用户提供优质的购物体验</p>
                </div>
                <div class="footer-section">
                    <h3>客户服务</h3>
                    <ul>
                        <li><a href="#">帮助中心</a></li>
                        <li><a href="#">联系客服</a></li>
                        <li><a href="#">意见反馈</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h3>购物指南</h3>
                    <ul>
                        <li><a href="#">购物流程</a></li>
                        <li><a href="#">配送说明</a></li>
                        <li><a href="#">退换货政策</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h3>关注我们</h3>
                    <div class="social-links">
                        <a href="credits.html" class="credits-link"><i class="fab fa-weixin"></i></a>
                        <a href="credits.html" class="credits-link"><i class="fab fa-weibo"></i></a>
                        <a href="credits.html" class="credits-link"><i class="fab fa-qq"></i></a>
                    </div>
                </div>
            </div>
            <div class="footer-bottom">
                <p>&copy; 2024 阿里宝宝电商平台. All rights reserved.</p>
            </div>
        </div>
    </footer>

    <!-- 确认删除 / Delete模态框 -->
    <div class="modal" id="confirmModal">
        <div class="modal-content">
            <div class="modal-header">
                <h2>确认操作</h2>
                <span class="close" id="closeConfirmModal">&times;</span>
            </div>
            <div class="modal-body">
                <p id="confirmMessage">确定 / Confirm要执行此操作吗？</p>
                <div class="modal-actions">
                    <button class="btn btn-outline" id="cancelConfirm">取消 / Cancel</button>
                    <button class="btn btn-danger" id="confirmAction">确认</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 加载提示 -->
    <div class="loading" id="loading">
        <div class="loading-spinner"></div>
        <p>加载中... / Loading...</p>
    </div>

    <!-- 通知提示 -->
    <div class="notification" id="notification">
        <div class="notification-content">
            <i class="fas fa-check-circle"></i>
            <span id="notificationText">操作成功</span>
        </div>
    </div>

    <!-- JavaScript文件 -->
    <script src="js/api.js"></script>
    <script src="js/auth.js"></script>
    <script src="js/cart.js"></script>
    <script src="js/product.js"></script>
    <script src="js/game.js"></script>
    <script src="js/cart-page.js"></script>
</body>
</html>
